package com.sc.nft.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sc.nft.entity.EcologyHatchDaoIncomeConf;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sc.nft.entity.vo.ecology.AdminDaoEcologyIncomePageVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;

/**
 * 生态-DAO收益配置(sc_ecology_hatch_dao_income_conf)数据Mapper
 *
 * @author Sun
 * @since 2023-12-02 16:37:21
 * @description 由 Mybatisplus Code Generator 创建
*/
@Mapper
public interface EcologyHatchDaoIncomeConfMapper extends BaseMapper<EcologyHatchDaoIncomeConf> {

    /**
     * DAO收益列表
     * @param page
     * @param daoName
     * @param dividendIncomeName
     * @param status
     * @return
     */
    Page<AdminDaoEcologyIncomePageVO> getPage(Page page, @Param("daoName") String daoName, @Param("dividendIncomeName") String dividendIncomeName, @Param("status") Boolean status);

    /**
     * 获取此dao中的所有配置的收益比列
     * @param daoId
     * @return
     */
    BigDecimal getSumIncomeScaleByDaoIdAndDaoIdentityId(@Param("daoId") Long daoId,@Param("hatchCollectionId") Long hatchCollectionId);
}
